package struct.decorator;

/**
 * Created by hmily on 2017/9/7.
 */
public class Decorator implements Decoratorable {

    private Decoratorable decoratorable;

    public Decorator(Decoratorable decoratorable) {
        this.decoratorable = decoratorable;
    }

    @Override
    public void method() {
        System.out.println("this is decorator");
        decoratorable.method();
        System.out.println("decorator end");
    }
}
